package com.yotta.operationdatascreencode.common.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * cos存储配置
 */
@Component
@ConfigurationProperties(prefix = "cos")
public class CosConfig {
    private static String secretId;
    private static String secretKey;
    private static String bucketName;
    private static String region;
    private static String maxSize;
    private static String nameLenth;

    private static String pathPrefix;
    @Value("${allowExtensions}.split(',')")
    private static String[] allowExtensions;

    public static String getSecretId() {
        return secretId;
    }

    public void setSecretId(String secretId) {
        CosConfig.secretId = secretId;
    }

    public static String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        CosConfig.secretKey = secretKey;
    }

    public static String getBucketName() {
        return bucketName;
    }

    public void setBucketName(String bucketName) {
        CosConfig.bucketName = bucketName;
    }

    public static String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        CosConfig.region = region;
    }

    public static String getMaxSize() {
        return maxSize;
    }

    public void setMaxSize(String maxSize) {
        CosConfig.maxSize = maxSize;
    }

    public static String getNameLenth() {
        return nameLenth;
    }

    public void setNameLenth(String nameLenth) {
        CosConfig.nameLenth = nameLenth;
    }

    public static String[] getAllowExtensions() {
        return allowExtensions;
    }

    public void setAllowExtensions(String[] allowExtensions) {
        CosConfig.allowExtensions = allowExtensions;
    }

    public static String getPathPrefix() {
        return pathPrefix;
    }

    public void setPathPrefix(String pathPrefix) {
        CosConfig.pathPrefix = pathPrefix;
    }
}
